{php include wl_template('common/header');}
<style type="text/css">
	.page-heading {
    padding: 5px 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
    position: relative;
    margin-left: 15px;
    }
</style>
<ul class="nav nav-tabs" id="myTab">
	<li class="active"><a href="#">类型列表</a></li>
</ul>
<div class="app-content">
	<div class="app-filter">
		<div class="filter-action">
			<a href="{php echo web_url('halfcard/halftype/add')}" class="btn btn-primary">增加类别</a>
		</div>
	</div>	
	<div class="app-table-list">
		<div class="table-responsive">
			<table class="table table-hover table-bordered">
				<thead>
				<tr>
					<th class="text-center" style="width:120px;">类型名称</th>
					<th class="text-center" style="width:60px;">时长</th>
					<th class="text-center" style="width:100px;">价格</th>
					<th class="text-center" style="width:100px;">匹配等级</th>
					<th class="text-center" style="width:40px;">排序</th>
					<th class="text-center" style="width:80px;">是否启用</th>
					<th class="text-center" style="width:80px;">操作</th>
				</tr>
				</thead>
				<tbody>
					{loop $list $item}
					<tr class="text-center" >
						<td>
							{$item['name']}
						</td>
						<td>
							{$item['days']}天
						</td>
						<td>{$item['price']}</td>
						<td>{$item['levelname']}</td>
						<td>{$item['sort']}</td>
						<td>{if $item['status']==1}<label class="label label-primary">启用</label>{else}<label class="label label-default">禁用</label>{/if}</td>
						<td style="position:relative;">
							<a href="{php echo web_url('halfcard/halftype/add',array('id'=>$item['id']))}">编辑  </a>
							-<a data-toggle='ajaxPost' href="{php echo web_url('halfcard/halftype/delType',['id' => $item['id']])}" data-confirm="确认删除该类型？">删除</a>
						</td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
	require(['jquery', 'util'], function($, util){
		$('.js-copy').each(function(){
			var id=$(this).attr('data-id');
			util.clip($("#js-copy"+id), $(this).attr('data-url'));
		});
	});
</script>
{php include wl_template('common/footer');}